import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import {resolve } from 'path';

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [react()],
  resolve: {
    // 配置路径别名
    alias: {
      '@':  resolve(__dirname, 'src'),
    },
  },
  css: {
    preprocessorOptions: {
      // 这里配置 mixin.scss 混合文件的全局引入
      scss: {
        additionalData: `@import "@/styles/mixin.scss";@import "@/styles/variate.scss";`
      }
    }
  }
})
